<!doctype html>
<html>
 <head> 
  <meta charset="utf-8"> 
  <title>citypicker 省市区联动插件 citypicker - layui 第三方组件平台</title> 
  <meta name="renderer" content="webkit"> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> 
  <meta name="description" content="省市区联动选择，目前最完美的。
2018-12-05 优化设置默认值的方法，重新下载覆盖原文件，
2018-12-13 修复可以使用多个选择的bug"> 
  <link rel="stylesheet" href="/t/font_24081_60slu02pimt.css">
  <link rel="stylesheet" href="/layui/dist/css/layui.css">
  <link rel="stylesheet" href="/static/css/fly/global.css" charset="utf-8">
  <link rel="stylesheet" href="/static/css/global.css" charset="utf-8">
  <link rel="stylesheet" href="/static/css/global.css" charset="utf-8">
 </head>
 <body>
  <div class="layui-header header header-extends" style="background-color: #24262F;"> 
   <div class="layui-container"> <a class="logo" href="https://layui.itmtr.cn/"> <img src="/static/images/layui/logo.png" alt="layui"> </a> 
    <div class="layui-form component" lay-filter="LAY-site-header-component"></div> 
    <ul class="layui-nav"> 
     <li class="layui-nav-item layui-hide-xs"> <a href="//layui.itmtr.cn/">框架</a> </li> 
     <li class="layui-nav-item layui-hide-xs layui-this"> <a href="/extend/index.html">扩展</a> </li> 
     <li class="layui-nav-item"> <a href="javascript:;">周边</a> 
      <dl class="layui-nav-child layui-nav-child-c"> 
       <dd lay-unselect> <a href="//layui.itmtr.cn/alone.html" target="_blank">独立组件</a> 
       </dd> 
       <dd class="layui-hide-sm layui-show-xs" lay-unselect> <a href="/extend/index.html">扩展组件</a> 
        <hr> 
       </dd> 
      </dl> </li> 
    </ul> 
   </div>
  </div><!--[if lt IE 9]>  <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>  <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script><![endif]--> 
  <div class="fly-extend-banner fly-extend-banner-sm"> 
   <div class="layui-carousel" id="FLY-extend-banner" data-height="200px"> 
    <div carousel-item> 
     <div style="background-image: url(/upload/2018_8/168_1535373858670_8825.jpg)">
      <div style="background: rgba(0,0,0,.6)"></div> 
     </div> 
    </div> 
   </div> 
   <h1 class="fly-extend-banner-title">layui 第三方组件平台</h1> 
   <div class="fly-extend-banner-release"> <a href="/extend/index.html" class="layui-btn layui-btn-lg">返回首页</a>
   </div> 
  </div>
  <div class="fly-extend-detail layui-card"> 
   <div class="layui-container"> 
    <div class="fly-extend-list-header"> 
     <h1 class="fly-extend-title layui-elip"> <a>citypicker 省市区联动插件</a> <span class="layui-badge layui-bg-green layui-hide-xs">citypicker</span> </h1> 
     <div class="fly-extend-list-info"> <a href="/u/1152312/index.html" target="_blank" class="fly-extend-list-user" title="发布者"> <cite class="layui-hide-xs">长河</cite> <img src="/qqapp/101235792/221525CD1BE8473F530D253BAF2212EA/100" alt="长河"> </a> 
     </div> 
    </div> 
    <blockquote class="fly-extend-list-desc layui-elem-quote"> 
     <p>省市区联动选择，目前最完美的。 2018-12-05 优化设置默认值的方法，重新下载覆盖原文件， 2018-12-13 修复可以使用多个选择的bug</p> 
    </blockquote> 
    <div class="fly-extend-list-bottom"> <span class="layui-inline">更新：2019-1-23 </span> <span class="layui-inline">创建：2018-11-19 </span> 
     <div class="layui-btn-container layui-extend-doc-edit"> 
     </div> 
    </div> 
   </div>
  </div>
  <div class="layui-container"> 
   <div class="layui-row layui-col-space20"> 
    <div class="layui-col-sm3 layui-col-md2"> 
     <div class="layui-card"> 
      <ul class="fly-extend-doc-nav" lay-filter="extend-doc-nav"> 
       <li class="layui-this" lay-id="doc"> <a href="javascript:;"><i class="iconfont icon-wendang"></i> 文档</a> </li> 
       <li lay-id="download"> <a href="javascript:;"><i class="iconfont icon-xiazai"></i> 下载</a> </li> 
      </ul> 
     </div> 
    </div> 
    <div class="layui-col-sm9 layui-col-md10"> 
     <div class="layui-card fly-extend-doc layui-show"> 
      <div class="layui-card-header"> 
       <h3 class="layui-inline layui-this">文档</h3> 
      </div> 
      <div class="layui-card-body detail-body photos layui-text"> 
       <img src="/upload/2018_11/1152312_1542095093733_33633.png"> 
       <br>
       <br>按插件规范添加到项目中，使用方式：
       <br>
       <br>head部分引用：
       <br>
       <pre>    &lt;script src="/LayuiAdmin/layui/layui_exts/city-picker/city-picker.data.js"&gt;&lt;/script&gt;<br>    &lt;link href="/LayuiAdmin/layui/layui_exts/city-picker/city-picker.css" rel="stylesheet" /&gt;</pre>body部分： 
       <br>
       <pre>&lt;div class="layui-inline"&gt;<br>      &lt;label class="layui-form-label width_auto text-r" style="margin-top:2px"&gt;省市县：&lt;/label&gt;<br>          &lt;div class="layui-input-inline" style="width:400px"&gt;<br>            &lt;input type="text" autocomplete="on" class="layui-input" id="city-picker" name="city-picker" readonly="readonly" data-toggle="city-picker" placeholder="请选择"&gt;<br>       &lt;/div&gt;<br>&lt;/div&gt;</pre>foot部分 
       <br>
       <pre>&lt;script&gt;<br>        layui.config({<br>            base: '/layuiadmin/' //静态资源所在路径<br>        }).extend({<br>            index: 'lib/index' //主入口模块<br>            , citypicker: '{/}/layuiadmin/layui/layui_exts/city-picker/city-picker' // {/}的意思即代表采用自有路径，即不跟随 base 路径<br>        }).use(['jquery', 'index', 'table', 'citypicker'], function () {<br>            var $ = layui.$<br>                , table = layui.table<br>                , form = layui.form<br>                , cityPicker = layui.citypicker;<br><br>           var currentPicker = new cityPicker("#city-picker", {<br>                provincename:"provinceId",<br>                cityname:"cityId",<br>                districtname: "districtId",<br>                level: 'districtId',// 级别<br>            });<br>            currentPicker.setValue("河南省/信阳市/新县");<br>        });<br><br> &lt;/script&gt;</pre>支持界面上放置多个下拉选择，
       <br>
       <img src="/upload/2018_12/1152312_1544709991421_61749.png"> 
       <br>
       <br>参考用例如下：
       <br>
       <pre>                        &lt;div class="layui-inline"&gt;<br>                            &lt;label class="layui-form-label width_auto text-r" style="margin-top:2px"&gt;省市县：&lt;/label&gt;<br>                            &lt;div class="layui-input-inline" style="width:400px"&gt;<br>                                &lt;input type="text" autocomplete="on" class="layui-input" id="city-picker" name="city-picker" readonly="readonly" data-toggle="city-picker"&gt;<br>                            &lt;/div&gt;<br>                        &lt;/div&gt;<br>                        &lt;div class="layui-inline"&gt;<br>                            &lt;label class="layui-form-label width_auto text-r" style="margin-top:2px"&gt;省市县2：&lt;/label&gt;<br>                            &lt;div class="layui-input-inline" style="width:400px"&gt;<br>                                &lt;input type="text" autocomplete="on" class="layui-input" id="city-picker2" name="city-picker2" readonly="readonly" data-toggle="city-picker"&gt;<br>                            &lt;/div&gt;<br>                        &lt;/div&gt;</pre>
       <pre>            var currentPicker = new cityPicker("#city-picker", {<br>                provincename:"provinceId",<br>                cityname:"cityId",<br>                districtname:"districtId"<br>            });<br>            //currentPicker.setValue("河南省/信阳市/新县");<br><br>            var currentPicker2 = new cityPicker("#city-picker2", {<br>                provincename: "provincenameid2",<br>                cityname: "citynameid2",<br>                districtname: "districtnameid2"<br>            });</pre>可控制级别的
       <br>
       <pre>var currentPicker = new cityPicker("#city-picker", {<br>                provincename:"provinceId",<br>                cityname:"cityId",<br>                districtname: "districtId",<br>                level: 'districtId',// 级别<br>            });</pre>使用有问题，联系QQ：340114173
       <br> 
      </div> 
     </div> 
     <div class="layui-card fly-extend-doc"> 
      <div class="layui-card-header"> 
       <h3 class="layui-inline layui-this">下载</h3> 
      </div> 
      <div class="layui-card-body detail-body layui-text"> 
       <div class="layui-btn-container"> <a href="//cdn.layui.com/extend/1152312_1544709851239_78188.rar" target="_blank" class="layui-btn layui-btn-lg layui-btn-primary"> 立即下载 </a> <a href="https://gitee.com/jinhuoyan/codes/a18hg2vljb7r50du6okwe18#city-picker.js" target="_blank" class="layui-btn layui-btn-lg layui-btn-primary layui-border-red"> 去码云下载 </a> 
        <blockquote class="layui-elem-quote">
          该扩展组件由第三方用户主动投递，并由其自身进行维护，本站仅做收集。 
        </blockquote> 
       </div> 
      </div> 
     </div> 
    </div> 
   </div>
  </div>
  <div class="fly-footer"> 
   <p>Copyright © 2021 <a href="/index.html">layui.itmtr.cn</a> MIT Licensed</p>
  </div>
  <script src="/layui/dist/layui.js"></script>
  <script>// common</script>

 </body>
<script src="/common/common.js"></script>
</html>